# Maintainer: AndyRTR <andyrtr@archlinux.org>
# Contributor: Kewl <xrjy@nygb.rh.bet(rot13)>
# Contributor: Justin Settle <jus10 at partlycloudy dot org>

pkgname=ttf-carlito
pkgver=20130920
pkgrel=6
pkgdesc="Google's Carlito font"
arch=(any)
license=(custom:OFL)
url='https://code.google.com/p/chromium/issues/detail?id=280557'
provides=(google-crosextra-carlito-fonts)
source=("https://commondatastorage.googleapis.com/chromeos-localmirror/distfiles/crosextrafonts-carlito-$pkgver.tar.gz"
        62-google-crosextra-carlito.conf)
sha256sums=('4bd12b6cbc321c1cf16da76e2c585c925ce956a08067ae6f6c64eff6ccfdaf5a'
            '31a74cd8044c8c8644f1555c06f406559f2e14334dd671a608145431a4299bd3')

package() {
  cd crosextrafonts-carlito-$pkgver

  install -Dm644 *.ttf -t "$pkgdir/usr/share/fonts/${pkgname#ttf-}"
  install -Dm644 "$srcdir"/62-google-crosextra-carlito.conf -t "$pkgdir"/usr/share/fontconfig/conf.avail

  install -d "$pkgdir"/usr/share/fontconfig/conf.default
  ln -sr "$pkgdir"/usr/share/fontconfig/conf.avail/* "$pkgdir"/usr/share/fontconfig/conf.default/

  install -Dm644 LICENSE -t "$pkgdir/usr/share/licenses/$pkgname"
}
